import Login from '../pages/login'
import IndexPage from '../pages/IndexPage'
import {About, Contact, Events, Home, Products} from "../pages/home";
import {Company, History, Location, Services} from "../com/AboutMain/AboutMain";
export default [
    {
        path:'/',
        name:'index',
        redirect:'/login'
    },
    {
        path: '/login',
        name:'login',
        component: Login,
        meta: {require: false},
        role:['admin','user1','user2']
    },
    {
        path: '/Main',
        name:'main',
        component: IndexPage,
        redirect:'/Main/Home',
        meta: {require: true},
        role:['admin','user1','user2'],
        children: [
            {
                path: '/Main/Home',
                name:'mainHome',
                component: Home,
                meta: {require: true},
                role:['admin','user1','user2'],
            },
            {
                path: '/Main/About',
                name:'mainAbout',
                component: About,
                redirect:'/Main/About/Company',
                meta: {require: true},
                role:['admin','user1','user2'],
                children:[
                    {
                        path: '/Main/About/Company',
                        component: Company,
                        name:'mainAboutCompany',
                        meta: {require: true},
                        role:['admin','user1','user2'],
                    },
                    {
                        path: '/Main/About/History',
                        name:'mainAboutHistory',
                        component: History,
                        meta: {require: true},
                        role:['admin','user1'],
                    },
                    {
                        path: '/Main/About/Location',
                        name:'mainAboutLocation',
                        component: Location,
                        meta: {require: true},
                        role:['admin','user2'],
                    },
                    {
                        path: '/Main/About/Services',
                        name:'mainAboutServices',
                        component: Services,
                        meta: {require: true},
                        role:['admin','user1','user2'],
                    },
                ]
            },
            {
                path: '/Main/Events',
                name:'mainEvnets',
                component: Events,
                meta: {require: true},
                role:['admin','user1','user2'],
            },
            {
                path: '/Main/Products',
                name:'mainProducts',
                component: Products,
                meta: {require: true},
                role:['admin','user2'],
            },
            {
                path: '/Main/Contact',
                name:'mainContact',
                component: Contact,
                meta: {require: true},
                role:['admin','user1'],
            },
        ]
    },
]